Repository navigation
schedule: dp: do not set the DP thread deadline from the LL user thread - #11486
Merged
Merged
Conversation
With CONFIG_SOF_USERSPACE_LL, scheduler_dp_recalculate() runs in the LL user thread, which has no permission on the DP thread objects. Starting a capture with a DP module, e.g. the DP SRC in sof-ptl-nocodec, oopses the LL thread: os.z_vrfy_k_thread_absolute_deadline_set: syscall z_vrfy_k_thread_absolute_deadline_set failed check: access denied The commit that added scheduler_dp_kick() left the direct k_thread_absolute_deadline_set() call in place, using the thread pointer from task memory. scheduler_dp_kick() already sets the deadline from the kernel-only task record, so drop the direct call. The same commit also converted the deadline from ms to cycles a second time when computing the relative deadline passed to scheduler_dp_kick(), and dropped the update of deadline_clock_ticks that the DP deadline miss telemetry relies on. Pass the already converted value and restore the deadline_clock_ticks update. Fixes: 20c417d ("schedule: dp: add scheduler_dp_kick() for applying DP scheduling results") Signed-off-by: Kai Vehmanen <[email protected]>
kv2019i
requested review from
LaurentiuM1234,
dbaluta,
marcinszkudlinski and
pblaszko
as code owners
November 18, 2026 14:12
Collaborator
Author
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the DP scheduler deadline-handling changes.
No open issues 🎉
What changed in this PR
Fixes DP deadline handling in the audio scheduler to avoid thread-permission failures when starting DP modules from the userspace LL thread.
Changes:
- Removes the direct thread deadline update, leaving it to the kernel-side
scheduler_dp_kick(). - Passes the already-converted cycle deadline without converting it again.
- Restores deadline tracking for newly triggered tasks to support deadline-miss telemetry.
| File | Description |
|---|---|
src/schedule/zephyr_dp_schedule_application.c |
Corrects deadline dispatch and conversion, and restores telemetry deadline tracking. |
Review effort: Balanced
lgirdwood
approved these changes
Nov 18, 2026
ujfalusi
approved these changes
Nov 18, 2026
PR 11486: test resultsRun date: 2026-11-18 14:49 UTC Tested commit: 4f11c63b6f5cd4583666fe99a8c6b22dbcd627f6 |
Collaborator
Author
|
This fixing a regression impacting other PRs, tests look good, so proceeding with merge. Sorry for the short review time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With CONFIG_SOF_USERSPACE_LL, scheduler_dp_recalculate() runs in the LL user thread, which has no permission on the DP thread objects. Starting a capture with a DP module, e.g. the DP SRC in sof-ptl-nocodec, oopses the LL thread:
os.z_vrfy_k_thread_absolute_deadline_set: syscall
z_vrfy_k_thread_absolute_deadline_set failed check: access denied
The commit that added scheduler_dp_kick() left the direct k_thread_absolute_deadline_set() call in place, using the thread pointer from task memory. scheduler_dp_kick() already sets the deadline from the kernel-only task record, so drop the direct call.
The same commit also converted the deadline from ms to cycles a second time when computing the relative deadline passed to scheduler_dp_kick(), and dropped the update of deadline_clock_ticks that the DP deadline miss telemetry relies on. Pass the already converted value and restore the deadline_clock_ticks update.
Fixes: 20c417d ("schedule: dp: add scheduler_dp_kick() for applying DP scheduling results")